package demo

import (
	"encoding/json"
	"fmt"
)



func GroupQuery() {
	Init()
	var gorupList []Group

	DB.Debug().Model(Advanced{}).
		Select(
			"group_concat as name_list",
			"count(id) as count",
			"gender").
		Group("gender").Scan(&gorupList)
	
	
	
	json, _ := json.Marshal(gorupList)
	fmt.Println(string(json))
}
